//SPICTL
#define PHASE 0x00			
#define CLKPOL 0x00		
#define MASTER 0x02		
#define SPI_ENABLE 0x01		

//SPIMODE
#define NUMBIT8 0x00		
#define SSIO 0x02			
#define SS_HIGH 0x01		

//Baud Rate Generator
#define BAUD_H 0x00		
#define BAUD_L 0x05		


//Alternate function of PC2(SS'), PC3(SCK), PC4(MOSI), PC5(MISO)
#define ALT_FUN 0x02		
#define PIN_ALT 0x3C		

//SPISTAT
#define TXST 0x02			

//Function Definition
void TransmitSPI(void);
void InitSPI(void);
void InitSPIRTC(void);
void AssertSS(void);
void DeassertSS(void);
unsigned char TransferSPI(unsigned char data);
unsigned char SPI_Read(unsigned char addr);
void SPI_Write(unsigned char data, unsigned char addr);